Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change namespace connectivity check template #594

Conversation

ricardomaraschini
Copy link
Contributor

Important

this change was introduced by replicatedhq/troubleshoot#1693 so that needs to go in first.

when templating the output of the namespace connectivity check we were referring to the 'fromCIDR' as 'fromNamespace'. it makes way more sense to refer to it as 'fromCIDR' as this is how it is provided in the input for the collector.

as this is a brand new feature it is very unlikely that anyone is using it (except for the embedded cluster that still needs to be patched accordingly).

this is how the analyser was defined before (notice the templating in the message field):

apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
    name: ec-cluster-preflight
spec:
    analyzers:
        - networkNamespaceConnectivity:
            collectorName: check-network-connectivity
            outcomes:
            - pass:
                message: "Communication between {{ .FromNamespace }} and {{ .ToNamespace }} is working"
            - fail:
                message: "{{ .ErrorMessage }}"

and this is how it is now:

apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
    name: ec-cluster-preflight
spec:
    analyzers:
        - networkNamespaceConnectivity:
            collectorName: check-network-connectivity
            outcomes:
            - pass:
                message: "Communication between {{ .FromCIDR }} and {{ .ToCIDR }} is working"
            - fail:
                message: "{{ .ErrorMessage }}"

when templating the output of the namespace connectivity check we were
referring to the 'fromCIDR' as 'fromNamespace'. it makes way more sense
to refer to it as 'fromCIDR' as this is how it is provided in the input
for the collector.

as this is a brand new feature it is very unlikely that anyone is using
it (except for the embedded cluster that still needs to be patched
accordingly).

this is how the analyser was defined before (notice the templating in
the `message` field):

```yaml
apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
    name: ec-cluster-preflight
spec:
    analyzers:
        - networkNamespaceConnectivity:
            collectorName: check-network-connectivity
            outcomes:
            - pass:
                message: "Communication between {{ .FromNamespace }} and {{ .ToNamespace }} is working"
            - fail:
                message: "{{ .ErrorMessage }}"
```

and this is how it is now:

```yaml
apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
    name: ec-cluster-preflight
spec:
    analyzers:
        - networkNamespaceConnectivity:
            collectorName: check-network-connectivity
            outcomes:
            - pass:
                message: "Communication between {{ .FromCIDR }} and {{ .ToCIDR }} is working"
            - fail:
                message: "{{ .ErrorMessage }}"

```
@ricardomaraschini ricardomaraschini added the type::feature New feature or request label Nov 21, 2024
Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for troubleshoot-sh ready!

Name Link
🔨 Latest commit 2e50fca
🔍 Latest deploy log https://app.netlify.com/sites/troubleshoot-sh/deploys/673f337bd2eab80008b057ef
😎 Deploy Preview https://deploy-preview-594--troubleshoot-sh.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ricardomaraschini ricardomaraschini merged commit 6dcd3e8 into main Nov 22, 2024
5 checks passed
@ricardomaraschini ricardomaraschini deleted the ricardomaraschini/sc-115066/change-namespace-connectivy-check-template branch November 22, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants